//
//  CommonTools.swift
//  WeiboSwift
//
//  Created by Apple13 on 16/7/12.
//  Copyright © 2016年 yupeng. All rights reserved.
//

import UIKit


//切换视图控制器通知名 - 通知步骤0⃣️
let SwitchRootVCNotification = "SwitchRootVCNotification"









//设置随机色1⃣️ - 抽取RGB函数
func RGB(red:CGFloat,green:CGFloat,blue:CGFloat) -> UIColor{
    return UIColor(red: red,green: green,blue: blue,alpha: CGFloat(arc4random_uniform(25))/25)
}

func RandomColor() -> UIColor {
    
    // 获取随机产生的色值
    
    let red = CGFloat(arc4random_uniform(25))/25
    let green = CGFloat(arc4random_uniform(256))/255
    let blue = CGFloat(arc4random_uniform(256))/255
    return RGB(red, green: CGFloat(green) / 255, blue: CGFloat(blue) / 255)
}


//  当前屏幕的宽度
let ScreenWidth = UIScreen.mainScreen().bounds.size.width
//  当前屏幕的高度
let ScreenHeight = UIScreen.mainScreen().bounds.size.height



func printLog(file:String = #file,functionName:String = #function,line: Int = #line) -> Void  {
    
    
    #if DEBUG
        print("\((file as NSString).lastPathComponent) [\(line)],\(functionName)")
    
    #endif
}